"use client";

import { memo } from "react";
import type { ReactNode, FC } from "react";
import Link from "next/link";

import styles from "./style.module.scss";
interface IProps {
  children?: ReactNode;
  name: string;
  moreLink: string;
}

const ListHeader: FC<IProps> = (props) => {
  const { name, moreLink } = props;
  return (
    <div className={styles.listHeaderWrapper}>
      <span>{name}</span>
      {moreLink && <Link href={moreLink}>查看更多{">"}</Link>}
    </div>
  );
};

export default memo(ListHeader);
